<html>
<head>

<style>
body
{

font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
color: #036;

}
</style>
</head>

<body>
<div id = "headerwrapper">

	<table id = "headerTable">
		<tr>
			<td>
				<img id = "unoLogo" src="Logo1.jpg" /> 
			</td>
			<td>
		<font size ="6.5"> Department of Computer Science </font>
				
			</td>
			<td>
			</td>

			
		</tr>
	</table>

	<div>
	</br>
	</br>
	</br>
<form method='post' action='admin_login.php'>
<table width='400' border='5' align='center'>
<tr>

<td colspan= '5' align= 'center'> <h1> Admin Panel</h1></td>
</tr>

<td align= 'center'>Admin Name </td>
<td><input type ='text' name='admin_name' /></td>
</tr>
<tr>

<td align= 'center'>Admin Password</td>
<td ><input type='password' name='admin_pass'/></td>
</tr>

<tr>

<td colspan='5' align='center'><input type='submit' name='admin_login' value='Login' /></td>

</tr>

</table>
</body>
</html>
<?php

mysql_connect("localhost", "root","");
mysql_select_db("db4208");
if(isset($_POST['admin_login'])){

$admin_name=$_POST['admin_name'];
$admin_pass=$_POST['admin_pass'];

$query="(SELECT * from admin WHERE admin_name='$admin_name' AND admin_pass='$admin_pass')";

$run=mysql_query($query);

if(mysql_num_rows($run)>0){

echo "<script> window.open('getchecklist.html', '_self')</script>";
}
 else
 {
 echo "<script>alert('Admin deatils are not correct')</script>";
 }

}

?>